package com.cloud.api.domain.job;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cloud.api.myenum.StationType;
import com.cloud.core.entity.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

@Data
@Schema(description = "服务站点")
@TableName("t_service_station")
public class ServiceStation extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    @Schema(description = "服务站点id")
    @TableId("id")
    private String id;

    @Schema(description = "类型")
    @TableField("type")
    @NotNull(message = "{validation.service.type}")
    private StationType type;

    @Schema(description = "服务站点名称")
    @TableField("station_name")
    @NotEmpty(message = "{validation.service.stationName}")
    private String stationName;

    @Schema(description = "纬度")
    @TableField("lat")
    @NotEmpty(message = "{validation.common.lat}")
    private String lat;

    @Schema(description = "经度")
    @TableField("lng")
    @NotEmpty(message = "{validation.common.lng}")
    private String lng;

    @Schema(description = "电话")
    @TableField("mobile")
    @NotEmpty(message = "{validation.common.phone}")
    @Pattern(regexp = "^1(3|4|5|6|7|8|9)\\d{9}$",message = "{validation.common.phoneFormat}")
    private String mobile;

    @Schema(description = "地址")
    @TableField("address")
    @NotEmpty(message = "{validation.common.address}")
    private String address;

    @Schema(description = "省份")
    @TableField("province")
    @NotEmpty(message = "{validation.common.province}")
    private String province;

    @Schema(description = "城市")
    @TableField("city")
    @NotEmpty(message = "{validation.common.city}")
    private String city;

    @Schema(description = "区县")
    @TableField("district")
    @NotEmpty(message = "{validation.common.district}")
    private String district;

    @Schema(description = "邮箱")
    @TableField("email")
    @Email(message = "{validation.user.email}")
    private String email;

    @Schema(description = "联系人")
    @TableField("contact_user")
    @NotEmpty(message = "{validation.service.contactUser}")
    private String contactUser;
}
